import React from 'react';
import {
    View,
} from 'react-native';

import TicketAddItem from './ticketAddItem';
import NavigationBar from '../../component/NavBarCommon';
import backIcon from '../../image/back.png';
import CLNavigatorHeader from '../../component/CLNavigatorHeader';

export default class TicketAdd extends React.Component {

    constructor(props) {
        super(props)
    }

    static navigationOptions = ({ navigation, screenProps }) => ({
        header:<CLNavigatorHeader navigation={navigation} title="优惠券编辑"
        />,
    });

    render() {
        let params = this.props.navigation.state.params;
        let token = undefined;
        let ticket = undefined;
        if (params != undefined) {
            token = params.token;
            ticket = params.ticket;
        }
        return (
            <View style={{flex:1 , flexDirection:'column', backgroundColor:'#ebebeb'}}>
                <TicketAddItem navigation = {this.props.navigation} token={token} ticket={ticket} />
            </View>
        );
    }

}